package com.itgone.easyblog.test;

import cn.hutool.http.HttpUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.itgone.easyblog.entity.Blog;

public class MainTest1 {

    public static void main(String[] args) {
//        String blogListSObjStr = HttpUtil.get("http://159.75.68.124:8607/mogu-web/index/getNewBlog?currentPage=1&pageSize=15");
//        JSONObject blogListSObj = JSONUtil.parseObj(blogListSObjStr);
//        JSONArray blogList = blogListSObj.getJSONObject("data").getJSONArray("records");
//
//        System.out.println(blogList);
//        blogList.stream().map(blogObj -> {
//            JSONObject entries = JSONUtil.parseObj(blogObj);
//            Blog blog = new Blog();
//            blog.setTitle();
//            return blog;
//        });
    }
}
